package mpcc.mpcc.activity.account_manage;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

import android.content.Intent;
import android.os.Bundle;

import mpcc.mpcc.activity.busi_presentation.BusinessShowActivity;
import mpcc.mpcc.base.BaseActivity;
import mpcc.mpcc.base.BaseInfo;

public class ChargeAction {
	public void myCharge(double amount, String bankcard, BaseActivity activity) {
		if (amount != 0.0) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
			String requestStr = "22100002" + BaseInfo.getMap().get("cardid")
					+ amount + bankcard + sdf.format(new Date());
			String accountmoney = "";
			BaseInfo.getMap().put("currentMoney", accountmoney);
			ArrayList<String> arrClass = new ArrayList<String>();
			arrClass.add(accountmoney);
			Bundle bundle = new Bundle();
			bundle.putSerializable("accountlist", arrClass);

			Intent intent = new Intent();
			intent.putExtras(bundle);
			intent.setClass(activity, ChargeSuccessActivity.class);
			activity.startActivity(intent);
		} else {

			BaseActivity.changeActivity(activity, ChargeFailActivity.class);

		}
	}
}
